#ifndef PAGEPACKETDETAIL_H
#define PAGEPACKETDETAIL_H

#include    <QtCore>
#include    <QtGui>

class subPaintPage : public QWidget
{
    Q_OBJECT

public:
    explicit subPaintPage(QWidget *parent = 0);
    ~subPaintPage();

    void setIndex(int index);
    void setChannel(int index);
    void setMaxMag(int max){maxValue->setText(QString::number(max));}

    int getIndex(){return labIndex->text().toInt()-1;}

private:
    QLabel *labIndex;
    QLabel *labChnl;
    QLabel *maxValue;

protected:
    void paintEvent(QPaintEvent *);

};

class pagePacketDetail : public QWidget
{
    Q_OBJECT

public:
    explicit pagePacketDetail(QWidget *parent = 0);
    ~pagePacketDetail();

    QList <subPaintPage*> subPages;

    int getPageID(){return pageID;}

    QPushButton *btnPre;
    QPushButton *btnNxt;

    void updateChnlMapping();

private:
    QWidget *widgetSetChnl;

    int subpage_to_be_set;

    int pageID;

protected:
    void mousePressEvent(QMouseEvent *e);

public slots:
    void setChnl(QString str);
    void changePage();

};

#endif // SUBPAINTPAGE_H
